From 3e7276208a9ecab93ed614c1fa774e161d6424eb Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 7 Jun 2011 20:11:24 +0000 Subject: [PATCH] Followup to r86061: add parser test case to confirm that '&apos' in wikitext doesn't make it to output. ''' is not defined in HTML 4, and some browsers (for instance IE at least through 8) do not support it. It is however part of XML 1 (and thus XHTML 1), and is also defined in HTML 5 provisional, so it's fine to accept it. Normalization seems to already handle turning the ' named char reference into ' so we don't have any compatibility worries. Also added a comment on the def in Sanitizer that it shouldn't be used in output. --- includes/Sanitizer.php | 2 +- tests/parser/parserTests.txt | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php index 113a85e112..e56783f3f8 100644 --- a/includes/Sanitizer.php +++ b/includes/Sanitizer.php @@ -64,7 +64,7 @@ class Sanitizer { 'amp' => 38, 'and' => 8743, 'ang' => 8736, - 'apos' => 39, + 'apos' => 39, // New in XHTML & HTML 5; avoid in output for compatibility with IE. 'Aring' => 197, 'aring' => 229, 'asymp' => 8776, diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt index 492d64699b..b2b4980745 100644 --- a/tests/parser/parserTests.txt +++ b/tests/parser/parserTests.txt @@ -9212,6 +9212,16 @@ Special characters in embedded file links (bug 27679) !! end +!! test +Confirm that 'apos' named character reference doesn't make it to output (not legal in HTML 4) +!! input +Text's been normalized? +!! result +

Text's been normalized? +

+!! end + + TODO: more images more tables -- 2.20.1